package cn.ulyer.common.annotation;


import cn.ulyer.common.transcode.secret.KeyProvider;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;


/**
 * 解密注解
 * @author :ulyer
 * 只对String 类型解密
 */
@Target({ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
public @interface Decrypt {

    String defaultAlgorithm() default "AES";

    boolean decryptAll()default false;

    DecryptProperty[] decryptProperties() default {};

    Class<? extends KeyProvider> defaultKeyProvider() default KeyProvider.None.class;

    /**
     * 优先级高于 defaultKeyProvider
     * @return
     */
    String defaultKey() default "";


}
